<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
	</head>
	
	<body>
		
		<script>
		
		
		
		
//		第一种去重
			var newArr = [];
			var arr = [1,2,1,3,3,8,6,6,5,9,5,0,0,0];
			for(var i=0; i<arr.length; i++)
			{
				if(newArr.indexOf(arr[i])==-1){
					newArr.push(arr[i])
				}
			}
			console.log(newArr)
//		第一种排序
	function bSort(array){
    	for(var a=array.length-1; a>0; a--){ 
     	for(var i=0; i<a; i++){
        	if(array[i]>array[i+1]){
          	var temp = array[i];
          	array.splice(i,1,array[i+1]);
          	array.splice(i+1,1,temp);
        	}
	      }
	    }
	  }
		bSort(arr)
		console.log(arr)

		</script>
		
		
		
		
	</body>
</html>
